#include "While.h"


While::While()
{
}


void While::gen(Label * begin, Label * next)
{
	Stmt::gen(begin, next);
	Label* label = new Label();
	this->cond->jumping(label, next);
	RTL::putLabel(label);
	this->body->gen(label, begin);
	RTL::putData(new Token(tag::JUMP, "jmp"), NULL, NULL, begin);
	
}

While::~While()
{
}
